#include<bits/stdc++.h>
using namespace std;
#define int long long

char ch[200005];
int dotPosition[200005];

signed main() {
	int t;
	cin >> t;
	while (t--) {
		int n;
		cin >> n;
		
		memset(ch, 0, sizeof ch);
		memset(dotPosition, 0, sizeof dotPosition);
		
		for (int i = 1; i <= n; i++)
			cin >> ch[i];
		for (int i = 1; i <= n; i++) {
			if ('b' <= ch[i] && ch[i] <= 'd') {

				if ('b' <= ch[i + 1] && ch[i + 1] <= 'd')
					dotPosition[i + 1] = 1;
				else if ((ch[i - 1] == 'a' || ch[i - 1] == 'e') && (ch[i + 1] == 'a' || ch[i + 1] == 'e'))
					dotPosition[i] = 1;

			}
		}
		for (int i = 1; i <= n; i++) {
			if (dotPosition[i])
				cout << ".";
			cout << ch[i];
		}
		cout << endl;
	}
	return 0;
}
